/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

/**
 * @Title: Goods.java
 * @Package phoenics.apeak.simple.entity
 * @Description
 * @author phoenics@126com
 * @date 2016-1-30 16:01:31
 * @version V1.0
 */
package phoenics.apeak.simple.entity;


import java.util.List;

import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import com.fasterxml.jackson.annotation.JsonProperty;

// TODO: Auto-generated Javadoc
/**
 * The Class Goods.
 *
 * @Description The Class Goods.
 */
@Document(collection="Goods")
@CompoundIndexes({  
    @CompoundIndex(name = "source_1_rawId_1", def = "{'source': 1, 'rawId': -1}",unique = true)  
})  
public class Goods {
	
	/**
 * The Class Stock.
 *
 * @Description The Class Stock.
 */
	public static class Stock{
		
		/** The color. */
		String color;
		
		/**
 * Gets the color.
 *
 * @return the color
 */
		public String getColor() {
			return color;
		}
		
		/**
 * Sets the color.
 *
 * @param color
 *            the new color
 */
		public void setColor(String color) {
			this.color = color;
		}
		
		/**
 * Gets the size.
 *
 * @return the size
 */
		public String getSize() {
			return size;
		}
		
		/**
 * Sets the size.
 *
 * @param size
 *            the new size
 */
		public void setSize(String size) {
			this.size = size;
		}
		
		/** The size. */
		String size;
	}
	
	/**
 * The Class Category.
 *
 * @Description The Class Category.
 */
	public static class Category{
		
		/** The name. */
		String name; 
 
 /**
 * Gets the name.
 *
 * @return the name
 */
 public String getName() {
			return name;
		}
		
		/**
 * Sets the name.
 *
 * @param name
 *            the new name
 */
		public void setName(String name) {
			this.name = name;
		}
		
		/**
 * Gets the id.
 *
 * @return the id
 */
		public String getId() {
			return id;
		}
		
		/**
 * Sets the id.
 *
 * @param id
 *            the new id
 */
		public void setId(String id) {
			this.id = id;
		}
		
		/** The id. */
		@Field("id")
		String id;
	}
	
	/**
 * The Class Brand.
 *
 * @Description The Class Brand.
 */
	public static class Brand{
		
		/**
 * The Constructor.
 *
 * @param name
 *            the name
 * @param hand
 *            the hand
 * @Description Instantiates a new brand.
 */
		public Brand(String name, String hand){
			setName(name);
			setHand(hand);
		}
		 
 		/**
 * Gets the name.
 *
 * @return the name
 */
 		public String getName() {
			return name;
		}
		
		/**
 * Sets the name.
 *
 * @param name
 *            the new name
 */
		public void setName(String name) {
			this.name = name;
		}
		
		/**
 * Gets the hand.
 *
 * @return the hand
 */
		public String getHand() {
			return hand;
		}
		
		/**
 * Sets the hand.
 *
 * @param hand
 *            the new hand
 */
		public void setHand(String hand) {
			this.hand = hand;
		}
		
		/** The name. */
		String name;
		
		/** The hand. */
		@Indexed()
		String hand;
	}
	
	/**
 * The Class Color.
 *
 * @Description The Class Color.
 */
	public static class Color{
		
		/**
 * Gets the name.
 *
 * @return the name
 */
		public String getName() {
			return name;
		}
		
		/**
 * Sets the name.
 *
 * @param name
 *            the new name
 */
		public void setName(String name) {
			this.name = name;
		}
		
		/**
 * Gets the image.
 *
 * @return the image
 */
		public List<String> getImage() {
			return image;
		}
		
		/**
 * Sets the image.
 *
 * @param list
 *            the new image
 */
		public void setImage(List<String> list) {
			this.image = list;
		}
		
		/**
 * Gets the canonical colors.
 *
 * @return the canonical colors
 */
		public List<String> getCanonicalColors() {
			return canonicalColors;
		}
		
		/**
 * Sets the canonical colors.
 *
 * @param canonicalColors
 *            the new canonical colors
 */
		public void setCanonicalColors(List<String> canonicalColors) {
			this.canonicalColors = canonicalColors;
		}
		
		/** The name. */
		private String name ;
		
		/** The image. */
		private List<String> image;
		
		/** The canonical colors. */
		private List<String> canonicalColors;
	}
	
	/**
 * Gets the raw id.
 *
 * @return the raw id
 */
	public String getRawId() {
		return rawId;
	}
	
	/**
 * Sets the raw id.
 *
 * @param rawId
 *            the new raw id
 */
	public void setRawId(String rawId) {
		this.rawId = rawId;
	}
	
	/**
 * Gets the ref category.
 *
 * @return the ref category
 */
	public String getRefCategory() {
		return refCategory;
	}
	
	/**
 * Sets the ref category.
 *
 * @param refCategory
 *            the new ref category
 */
	public void setRefCategory(String refCategory) {
		this.refCategory = refCategory;
	}
	
	/**
 * Gets the categories.
 *
 * @return the categories
 */
	public List<Category> getCategories() {
		return categories;
	}
	
	/**
 * Sets the categories.
 *
 * @param list
 *            the new categories
 */
	public void setCategories(List<Category> list) {
		this.categories = list;
	}
	
	/**
 * Gets the source.
 *
 * @return the source
 */
	public String getSource() {
		return source;
	}
	
	/**
 * Sets the source.
 *
 * @param source
 *            the new source
 */
	public void setSource(String source) {
		this.source = source;
	}
	
	/**
 * Gets the name.
 *
 * @return the name
 */
	public String getName() {
		return name;
	}
	
	/**
 * Sets the name.
 *
 * @param name
 *            the new name
 */
	public void setName(String name) {
		this.name = name;
	}
	
	/**
 * Gets the currency.
 *
 * @return the currency
 */
	public String getCurrency() {
		return currency;
	}
	
	/**
 * Sets the currency.
 *
 * @param currency
 *            the new currency
 */
	public void setCurrency(String currency) {
		this.currency = currency;
	}
	
	/**
 * Gets the total price.
 *
 * @return the total price
 */
	public String  getTotalPrice() {
		return totalPrice;
	}
	
	/**
 * Sets the total price.
 *
 * @param totalPrice
 *            the new total price
 */
	public void setTotalPrice(String  totalPrice) {
		this.totalPrice = totalPrice;
	}
	
	/**
 * Gett categories.
 *
 * @return the t categories
 * @Description Gets the t categories.
 */
	public List<TCategory> gettCategories() {
		return tCategories;
	}
	
	/**
 * Sett categories.
 *
 * @param tCategories
 *            the new t categories
 * @Description Sets the t categories.
 */
	public void settCategories(List<TCategory> tCategories) {
		this.tCategories = tCategories;
	}
	
	/**
 * Gets the tags.
 *
 * @return the tags
 */
	public List<String> getTags() {
		return tags;
	}
	
	/**
 * Sets the tags.
 *
 * @param tags
 *            the new tags
 */
	public void setTags(List<String> tags) {
		this.tags = tags;
	}
	
	/**
 * Gets the images.
 *
 * @return the images
 */
	public List<String> getImages() {
		return images;
	}
	
	/**
 * Sets the images.
 *
 * @param images
 *            the new images
 */
	public void setImages(List<String> images) {
		this.images = images;
	}
	
	/**
 * Gets the alternate images.
 *
 * @return the alternate images
 */
	public List<String> getAlternateImages() {
		return alternateImages;
	}
	
	/**
 * Sets the alternate images.
 *
 * @param alternateImages
 *            the new alternate images
 */
	public void setAlternateImages(List<String> alternateImages) {
		this.alternateImages = alternateImages;
	}
	
	/**
 * Gets the retailer.
 *
 * @return the retailer
 */
	public String getRetailer() {
		return retailer;
	}
	
	/**
 * Sets the retailer.
 *
 * @param retailer
 *            the new retailer
 */
	public void setRetailer(String retailer) {
		this.retailer = retailer;
	}
	
	/**
 * Gets the product page.
 *
 * @return the product page
 */
	public String getProductPage() {
		return productPage;
	}
	
	/**
 * Sets the product page.
 *
 * @param productPage
 *            the new product page
 */
	public void setProductPage(String productPage) {
		this.productPage = productPage;
	}
	
	/**
 * Gets the description.
 *
 * @return the description
 */
	public String getDescription() {
		return description;
	}
	
	/**
 * Sets the description.
 *
 * @param description
 *            the new description
 */
	public void setDescription(String description) {
		this.description = description;
	}
	
	/**
 * Gets the update time.
 *
 * @return the update time
 */
	public Long getUpdateTime() {
		return updateTime;
	}
	
	/**
 * Sets the update time.
 *
 * @param updateTime
 *            the new update time
 */
	public void setUpdateTime(Long updateTime) {
		this.updateTime = updateTime;
	}
	
	/**
 * Gets the brand.
 *
 * @return the brand
 */
	public Brand getBrand() {
		return brand;
	}
	
	/**
 * Sets the brand.
 *
 * @param brand
 *            the new brand
 */
	public void setBrand(Brand brand) {
		this.brand = brand;
	}
	
	/**
 * Gets the promotional deal.
 *
 * @return the promotional deal
 */
	public PromotionalDeal getPromotionalDeal() {
		return promotionalDeal;
	}
	
	/**
 * Sets the promotional deal.
 *
 * @param promotionalDeal
 *            the new promotional deal
 */
	public void setPromotionalDeal(PromotionalDeal promotionalDeal) {
		this.promotionalDeal = promotionalDeal;
	}
	
	/**
 * Gets the sale price.
 *
 * @return the sale price
 */
	public String  getSalePrice() {
		return salePrice;
	}
	
	/**
 * Sets the sale price.
 *
 * @param salePrice
 *            the new sale price
 */
	public void setSalePrice(String  salePrice) {
		this.salePrice = salePrice;
	}
	
	/**
 * Checks if is the in sock.
 *
 * @return the in sock
 */
	public boolean isInSock() {
		return inSock;
	}
	
	/**
 * Sets the in sock.
 *
 * @param inSock
 *            the new in sock
 */
	public void setInSock(boolean inSock) {
		this.inSock = inSock;
	}

	/**
 * Gets the stock.
 *
 * @return the stock
 */
	public List<Stock> getStock() {
		return stock;
	}
	
	/**
 * Sets the stock.
 *
 * @param stock
 *            the new stock
 */
	public void setStock(List<Stock> stock) {
		this.stock = stock;
	}

	/**
 * Gets the colors.
 *
 * @return the colors
 */
	public List<Color> getColors() {
		return colors;
	}
	
	/**
 * Sets the colors.
 *
 * @param colors
 *            the new colors
 */
	public void setColors(List<Color> colors) {
		this.colors = colors;
	}

	/**
 * Gets the sizes.
 *
 * @return the sizes
 */
	public List<String> getSizes() {
		return sizes;
	}
	
	/**
 * Sets the sizes.
 *
 * @param sizes
 *            the new sizes
 */
	public void setSizes(List<String> sizes) {
		this.sizes = sizes;
	}
	
	/**
 * Gets the retailer host domain.
 *
 * @return the retailer host domain
 */
	public String getRetailerHostDomain() {
		return retailerHostDomain;
	}
	
	/**
 * Sets the retailer host domain.
 *
 * @param retailerHostDomain
 *            the new retailer host domain
 */
	public void setRetailerHostDomain(String retailerHostDomain) {
		this.retailerHostDomain = retailerHostDomain;
	}
	
	public String getMyUrl() {
		return myUrl;
	}

	public void setMyUrl(String myUrl) {
		this.myUrl = myUrl;
	}

	/** The raw id. */
	@JsonProperty("id")
	private String rawId;                   //数据ID 目前使用shopstyle 网站中的ID
	
	/** The ref category. */
	private String refCategory;         //抓取数据时使用的分类
	
	/** The categories. */
	private List<Category> categories;   // 数据自己的分类
	
	/** The source. */
	private String source;                //数据来源
	
	/** The name. */
	@Indexed()
	private String name;                  //产品的名称
	
	/** The currency. */
	private String currency;              //标价使用的货币名称简写,例如 美元,使用USD
	
	/** The total price. */
	private String   totalPrice;                  //价格
	
	/** The t categories. */
	private List<TCategory> tCategories;/// shopstyle的分类，以后有了自己的分类后，将为空
	
	/** The tags. */
	private List<String> tags;                 //商品标签
	
	/** The images. */
	private List<String> images;            //商品默认使用的图片,可能多个,分别是pc,手机等等
	
	/** The alternate images. */
	private List<String> alternateImages;  //轮换的图片
	
	/** The retailer. */
	private String retailer;                        //零售商,目前是名称
	
	/** The product page. */
	private String productPage;               //详情页ID
	
	/** The description. */
	private String description;                 //商品介绍
	
	/** The update time. */
	private Long updateTime;                //数据更新时间戳
	
	/** The brand. */
	private Brand brand;                        //品牌ID
	
	/** The promotional deal. */
	private PromotionalDeal promotionalDeal; //促销信息
	
	/** The sale price. */
	private String  salePrice;                       //打折售价
	//@JsonProperty("id")
	/** The stock. */
	private List<Stock> stock;          //库存
	//@JsonProperty("id")
	/** The in sock. */
	private boolean inSock;               //是否还有库存
	
	/** The colors. */
	private List<Color> colors;            //颜色
	
	/** The sizes. */
	private List<String> sizes;           //款式
	
	/** The retailer host domain. */
	private  String retailerHostDomain; //供应商主机地址,例如 www.addas.com
	private String myUrl;
}



